package com.lansi.service;

import java.util.Random;






public class RegisterCodeGen {
	//注册码
	public static String register(int length,String sn) {
		  
        String str="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";  
        Random random = new Random();  
        StringBuffer sb = new StringBuffer();  
          
        for(int i = 0 ; i < length; ++i){  
            int number = random.nextInt(62);
              
            sb.append(str.charAt(number));  
        }
        
        StringBuffer sb1 = new StringBuffer(); 
        sb1.append(sn);
        sb1.append(sb);
		return sb1.toString();  
     
    
	}
}
